The present invention relates to the field of simulations. More particularly, the present invention relates to detecting errors present in simulations.
Simulations are used to model physical devices to facilitate device design, prototyping, and/or testing. A computer system typically runs simulations by executing a set of instructions or code representative of devices and the functionalities/interactions that occur between these devices. A modeled device may comprise a component on an integrated chip (e.g., a transistor, processor, bus, clock, memory, etc.), the entire integrated circuit (IC), a system including an IC, or other components of an electronic system. During simulation, devices are modeled as modules, and operations or transactions involving the devices may be modeled at a designer-specified level of detail. Transaction level modeling (TLM) specification by Open SystemC Initiative (OSCI) is an example of a discrete event simulation.
As devices become increasingly complex, designers correspondingly turn to simulators to increase design productivity. Errors can be introduced into the simulation either because there is a design flaw in the device being modeled or the coding of the design into the simulator is incorrect (thus, the model does not accurately reflect the design). This error may go unnoticed until the simulation is complete and results analyzed, the simulator crashes, or the designer manually notices the error. Given market demands for rapid design development, it would be beneficial for designers to become aware of such errors early in the simulation process rather than later.
For example, when simulating memory devices, early detection of memory access violations would be helpful in the design process. To effectively model memory devices, transport function calls representing read and write operations to and from memory are simulated. Transport function calls include address information specifying actions involving particular memory locations of a particular memory module. If the address information in a transport function call does not correspond to a valid memory location for the associated memory module, then the transport function call includes a memory access violation. Detection of such a memory access violation may indicate the presence of a design flaw and/or coding flaw in the model representing a device design.
Thus, it would be beneficial to provide early detection of memory access violations in simulations. A designer would benefit from knowing about a memory access violation in real-time or near real-time, preferably before the simulation is complete. Early detection of memory access violation serves as an effective debugging feature in a software debugging environment. Early detection of memory access violation also permits real-time or near real-time pin point of simulator error. Providing early detection information may allow the designer to make design changes or correct modeling of the design in the simulator as soon as possible, thereby potentially preventing a simulator crash or unnecessarily lengthening the overall design time. Another benefit is having the early detection feature automatically within a known simulation environment—the designer need not concern him or herself with additional or special code to perform special checks.